﻿<?PHP
header('Content-Type: text/html; charset=utf-8'); 
	include "classes/class.inventorydatabase.php";
	include "query.webapi.php";
	
	$result = new webAPIResultObject();
	
	$iDB = new InventoryDatabase();
	
	//($name, $description, $upc, $size, $sizeId, $brandId, $groupId)
	$iDB->openConnection("./config/config.database.xml");
	//print_r( $iDB->getProducts());
	
	$result->setID("009");
	$result->setState("ok");
	foreach ( $iDB->getProducts() as $row ){
		$result->addRow($row);
	}
	
	echo "<textarea style='width: 100%; height: 100%;'>".$result->getObject()."</textarea>";
	
?>